package com.llb666.shop.items.infrastructure.mapper;

import com.llb666.common.core.tk.mapper.MyMapper;
import com.llb666.shop.items.api.vo.SearchItemsVo;
import com.llb666.shop.items.domain.entity.bo.ItemsCommentBo;
import com.llb666.shop.items.infrastructure.po.ItemsPo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author llb666
 */
@Repository
public interface ItemsMapper extends MyMapper<ItemsPo> {

    /**
     * 查看商品评论
     *
     * @param itemsId 商品id
     * @param level   评论等级
     * @return 评论列表
     */
    List<ItemsCommentBo> queryItemComments(@Param("itemsId") String itemsId, @Param("level") Integer level);

    /**
     * 通过分类id搜索商品列表
     *
     * @param catId 类目id
     * @param sort  排序
     * @return 商品列表
     */
    List<SearchItemsVo> searchItemsByThirdCat(@Param("catId") Integer catId, @Param("sort") String sort);


}